using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace AlgorithmsVisualized
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
        }

        private void frmMain_MouseDown(object sender, MouseEventArgs e)
        {
        }
        private void graphPic_NewEdgeRequest(object sender, ref AlgorithmsVisualized.Controls.EdgeArgs args)
        {
            frmNewEdge newEdge = new frmNewEdge();
            DialogResult dlgRes = newEdge.ShowDialog();
            if (dlgRes == DialogResult.OK)
            {
                args.Weight = newEdge.Weight;
                args.IsDirected = true;
            }
        }
        private void graphPic_SelectionChanged(object sender, AlgorithmsVisualized.Controls.ShapeArgs args)
        {
            propGrd.SelectedObject = args.Shape;
        }
    }
}
